<!--
描述：学校信息-新增组件
开发人：fwb
开发日期：2017年8月22日
-->

<template lang="pug">
    kalix-dialog.user-add(bizKey="schoolInfo" ref="kalixBizDialog" v-bind:form-model.sync="formModel" v-bind:targetURL="targetURL")
        div.el-form(slot="dialogFormSlot")
            el-form-item.s-flex(label="学校代码" prop="xxdm" v-bind:rules="rules.xxdm" v-bind:label-width="labelWidth")
                el-input(v-model="formModel.xxdm")
            div.s-flex
                el-form-item.s-flex_item(label="学校类别" prop="xxlb" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.xxlb")
                el-form-item.s-flex_item(label="学校性质" prop="xxxz" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.xxxz")
            div.s-flex
                el-form-item.s-flex_item(label="中文名称" prop="zwmc" v-bind:rules="rules.zwmc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zwmc")
                el-form-item.s-flex_item(label="中文简称" prop="zwjc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zwjc")
            div.s-flex
                el-form-item.s-flex_item(label="英文名称" prop="ywmc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.ywmc")
                el-form-item.s-flex_item(label="英文简称" prop="ywjc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.ywjc")
            div.s-flex
                el-form-item.s-flex_item(label="主管部门" prop="zgbm"  v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zgbm")
                el-form-item.s-flex_item(label="书记" prop="sj"  v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.sj")
                el-form-item.s-flex_item(label="校长" prop="xz" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.xz")
            div.s-flex
                el-form-item.s-flex_item(label="电话" prop="dh" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.dh")
                el-form-item.s-flex_item(label="传真" prop="cz" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.cz")
            div.s-flex
                el-form-item.s-flex_item(label="联系人" prop="lxr" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.lxr")
                el-form-item.s-flex_item(label="电子邮箱" prop="dzyx" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.dzyx")
            div.s-flex
                el-form-item.s-flex_item(label="网址" prop="wz" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.wz")
                el-form-item.s-flex_item(label="邮编" prop="yb" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.yb")
            el-form-item.s-flex(label="地址" prop="dz" v-bind:rules="rules.dz" v-bind:label-width="labelWidth")
                el-input(v-model="formModel.dz")

</template>

<script type="text/ecmascript-6">
    import FormModel from './model'
    import {schoolInfoURL} from '../../config.toml'

    export default {
        name: 'SchoolInfoAdd',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                rules: {
                    xxdm: [{required: true, message: '请输入学校代码', trigger: 'blur'}],
                    zwmc: [{required: true, message: '请输入中文名称', trigger: 'blur'}],
                    dz: [{required: true, message: '请输入学校地址', trigger: 'blur'}]
                },
                targetURL: schoolInfoURL,
                labelWidth: '120px'
            }
        },
        components: {},
        created() {
        },
        methods: {}
    }
</script>

<style scoped lang="stylus">
    .el-form
        padding 30px 70px 30px 20px
</style>
